const { resolve } = require('path')
const isProd = process.env.NODE_ENV === 'production'

let cfg = {
  port: 5102,
  db: 'mongodb://localhost/movie'
}

if (isProd) {
  const config = require(resolve(__dirname, '../../../../config/config.json'))

  cfg = Object.assign(cfg, config)
}

module.exports = cfg
